package com.atguigu07.equals.exer1;

/**
 * ClassName: OrderTest
 * Package: com.atguigu07.equals.exer1
 * Description:
 *
 * @Author ZY
 * @Create 21:32
 * @Version 1.0
 */
public class OrderTest {
    public static void main(String[] args) {
        Order o1 = new Order(1001,"AA");
        Order o2 = new Order(1001,"AA");

        System.out.println(o1.equals(o2));//true

        Order o3 = new Order(1002,new String("AA"));
        Order o4 = new Order(1002,new String("AA"));

        System.out.println(o3.equals(o4));//true


        String str1 = "AA";
        String str2 = "AA";
        System.out.println(str1.equals(str2));//true
    }
}
